package com.design.pattern.factory;

import java.util.ArrayList;

public abstract class Pizza {

    String name;
    String dough;
    String sauce;
    ArrayList toppings = new ArrayList();

    public void prepare() {
        System.out.println("要做的披萨是" + name);
        System.out.println("发酵面团" + dough);
        System.out.println("添加" + sauce);
        System.out.println("选择作料");
        for (Object topping : toppings) {
            System.out.println(" " + topping);
        }
    }

    public void bake() {
        System.out.println("烘焙20-30分钟");
    }

    public void cut() {
        System.out.println("切成8片");
    }

    public void box() {
        System.out.println("用正方向盒打包");
    }

}